#!/usr/bin/expect

spawn build/bin/observer -f etc/observer.ini -P cli 
expect "miniob >"
send "drop table t_order_by;\r"
expect "miniob >"
send "create table t_order_by(id int, score float, name char(4));\r"
expect "miniob >"
send "insert into t_order_by values(3, 1.0, 'ad');\r"
expect "miniob >"
send "insert into t_order_by values(1, 2.0, 'bhg');\r"
expect "miniob >"
send "insert into t_order_by values(1, 5.0, 'bsg');\r"
expect "miniob >"
send "insert into t_order_by values(4, 3.0, 'cfs');\r"
expect "miniob >"
send "insert into t_order_by values(3, 1.0, 'gsdf');\r"
expect "miniob >"
send "insert into t_order_by values(1, 2.0, 'sfd');\r"
expect "miniob >"
send "insert into t_order_by values(1, 5.0, 'bsdf');\r"
expect "miniob >"
send "insert into t_order_by values(4, 3.0, 'ccxa');\r"
expect "miniob >"
send "select * from t_order_by order by id;\r"
expect "miniob >"
send "select * from t_order_by order by id asc, score desc, name desc;\r"
interact